<template>
  <div>
    <el-input v-bind:value="value" @input="editInput" clear v-show="edit"></el-input>
    <p v-show="!edit">
      {{value}}
    </p>
  </div>
</template>

<script>
/*
*  <edit-cell v-model="scope.row.orderNo" :edit="scope.$index === cellIndex"></edit-cell>
* */
export default {
  name: "EditCell",
  props: {
    edit: {
      type: Boolean,
      default: false,
      required: true
    },
    value: {
      type: String,
      default: ''
    }
  },
  methods: {
    editInput(e) {
      console.log(e)
      this.$emit(`input`, e);
    },
  },
}
</script>

<style scoped>

</style>
